<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});


$api = app('Dingo\Api\Routing\Router');

$apiFunc = function ($api) {
    //无需token
    $api->group(['namespace' => 'App\Api\Controllers\Basequery', 'prefix' => 'basequery'], function ($api) {
        $api->any('city', 'CityController@city');
        $api->any('test', 'TestController@test');
        $api->any('test1', 'TestController@test1');
        $api->any('appUpdate', 'SelectController@appUpdate');
        $api->any('settle_mode_type', 'SelectController@settle_mode_type');
        $api->any('alipay_isv_info', 'SelectController@alipay_isv_info');
        $api->any('openways', 'StorePayWaysController@openways');
        $api->any('beian', 'SelectController@beian');
        $api->any('get_logo', 'SelectController@get_logo');
        $api->any('vbill_store_category', 'SelectController@vbill_store_category'); //随行付门店经营类型
        $api->any('create_company', 'StorePayWaysController@create_company');

        /**
         * 同步乐刷数据写入数据库 PS：同步城市code、银行、行业编码
         */
        $api->any('getMccList', 'TestController@getMccList');
        $api->any('getParentCode', 'TestController@getParentCode');
        $api->any('img-upload', 'HuifuTestController@testImg');
    });

    //小票盒子
    $api->group(['namespace' => 'App\Api\Controllers\Pay', 'prefix' => 'pay'], function ($api) {
        $api->any('print', 'IndexController@print');
        $api->any('pingan', 'IndexController@pingan');
        $api->any('pingan1', 'IndexController@pingan1');
    });

    //支付宝 无需token
    $api->group(['namespace' => 'App\Api\Controllers\AlipayOpen', 'prefix' => 'alipayopen'], function ($api) {
        $api->any('callback', 'OauthController@callback');
        $api->any('qr_pay_notify', 'NotifyController@qr_pay_notify');
        $api->any('fq_pay_notify', 'NotifyController@fq_pay_notify');

        $api->any('zft_qr_pay_notify', 'NotifyController@zft_qr_pay_notify');
        $api->any('zft_fq_pay_notify', 'NotifyController@zft_fq_pay_notify');

        $api->any('gateway', 'NotifyController@gateway');

        $api->any('get_user_infos', 'UserController@get_user_infos');
        $api->any('get_invoice_title', 'InvoiceController@get_invoice_title');

    });

    //支付宝 需token
    $api->group(['namespace' => 'App\Api\Controllers\AlipayOpen', 'prefix' => 'alipayopen', 'middleware' => 'public.api'], function ($api) {
        $api->any('query_store_status', 'ZftController@query_store_status');
        $api->any('user_rate', 'ZftController@user_rate');
        $api->any('set_user_rate', 'ZftController@set_user_rate');

        $api->any('store_fq_rate', 'ZftController@store_fq_rate');
        $api->any('set_store_fq_rate', 'ZftController@set_store_fq_rate');

        $api->any('store_all_fq_rate', 'ZftController@store_all_fq_rate');
        $api->any('set_store_all_fq_rate', 'ZftController@set_store_all_fq_rate');

        $api->any('iot_device_bind', 'IotController@iot_device_bind');
        $api->any('iot_device_unbind', 'IotController@iot_device_unbind');
        $api->any('iot_device_bind_query', 'IotController@iot_device_bind_query');


    });

    //网商无需token
    $api->group(['namespace' => 'App\Api\Controllers\MyBank', 'prefix' => 'mybank'], function ($api) {
        $api->any('notify', 'NotifyController@notify');
        $api->any('notifyPayResult', 'NotifyController@notifyPayResult');

        //静态码提交接口
        $api->any('qr_pay_submit', 'QrpayController@qr_pay_submit');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');


        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        $api->any('test', 'TestController@test');
    });

    //fuiou无需token
    $api->group(['namespace' => 'App\Api\Controllers\Fuiou', 'prefix' => 'fuiou'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
        $api->any('notifyPayResult', 'NotifyController@notifyPayResult');

        //静态码提交接口
        $api->any('qr_pay_submit', 'QrpayController@qr_pay_submit');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');


        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        $api->any('test', 'TestController@test');
    });

    //fuiou需token
    $api->group(['namespace' => 'App\Api\Controllers\Fuiou', 'prefix' => 'fuiou', 'middleware' => 'public.api'], function ($api) {
        $api->any('import_mercId', 'SelectController@import_mercId');
        $api->any('store_list', 'SelectController@store_list');
        $api->any('del_store', 'SelectController@del_store');
        $api->any('open_da', 'SelectController@open_da');
        $api->any('select_money', 'SelectController@select_money');
        $api->any('out_money', 'SelectController@out_money');


    });

    //联拓富无需token
    $api->group(['namespace' => 'App\Api\Controllers\Ltf', 'prefix' => 'ltf'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
        //静态码提交接口
        $api->any('qr_pay_submit', 'QrpayController@qr_pay_submit');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');


        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');


    });

    //传化无需token
    $api->group(['namespace' => 'App\Api\Controllers\Tfpay', 'prefix' => 'tfpay'], function ($api) {
        $api->any('store_notify', 'NotifyController@store_notify');
        $api->any('notify_url', 'NotifyController@notify_url');


        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');


        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');


        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');


    });

    //随行付无需token
    $api->group(['namespace' => 'App\Api\Controllers\Vbill', 'prefix' => 'vbill'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
        $api->any('wufushang_notifyurl', 'NotifyController@wufushang_notifyurl');
        $api->any('wingpay_notify_url', 'NotifyController@wingpay_notify_url');
        $api->any('wingpay_cancel_notify_url', 'NotifyController@wingpay_cancel_notify_url');
        $api->any('safepay_notify_url', 'NotifyController@safepay_notify_url');
        $api->any('wingpay_notify_url1', 'NotifyController@wingpay_notify_url1');
        $api->any('vbill_pospay_notify', 'NotifyController@vbill_pospay_notify');
        $api->any('pay_notify_a_url', 'NotifyController@pay_notify_a_url'); //随行付a 支付回调
        $api->any('refund_notify_url', 'NotifyController@refund_notify_url');
        $api->any('weChatApplyNotify', 'NotifyController@weChatApplyNotify'); //微信实名认证回调
        $api->any('weChatApplyNotifyA', 'NotifyController@weChatApplyNotifyA'); //随行付a 微信实名认证回调
        $api->any('weixin/icbc_oauth', 'OauthController@icbc_oauth');
        $api->any('weixin/icbc_alioauth', 'OauthController@icbc_alioauth');
        $api->any('weixin/icbc_pay_view', 'OauthController@icbc_pay_view');
        $api->any('weixin/icbc_alipay_view', 'OauthController@icbc_alipay_view');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth1', 'OauthController@oauth1');
        $api->any('weixin/icbc_oauth_callback', 'OauthController@icbc_oauth_callback');
        $api->any('weixin/icbc_alioauth_callback', 'OauthController@icbc_alioauth_callback');
        $api->any('weixin/wingoauth', 'OauthController@wingoauth');
        $api->any('weixin/safeoauth', 'OauthController@safeoauth');
        $api->any('weixin/youpayoauth', 'OauthController@youpayoauth');
        $api->any('weixin/wingpay', 'OauthController@wingpay');
        $api->any('merch_qr', 'OauthController@merch_qr');
        $api->any('wxmerch_qr', 'OauthController@wxmerch_qr');
        $api->any('storelist', 'OauthController@storelist');
        $api->any('weixin/unwingpay', 'OauthController@unwingpay');
        $api->any('weixin/unsafepay', 'OauthController@unsafepay');
        $api->any('weixin/unyoupay', 'OauthController@unyoupay');
        $api->any('weixin/user_payqr', 'OauthController@user_payqr');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/oauth_callback1', 'OauthController@oauth_callback1');
        $api->any('weixin/wingoauth_callback', 'OauthController@wingoauth_callback');
        $api->any('weixin/safeoauth_callback', 'OauthController@safeoauth_callback');
        $api->any('weixin/youpayoauth_callback', 'OauthController@youpayoauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/pay_view1', 'OauthController@pay_view1');
        $api->any('weixin/wingpay_view', 'OauthController@wingpay_view');
        $api->any('weixin/safepay_view', 'OauthController@safepay_view');
        $api->any('weixin/youpay1_view', 'OauthController@youpay1_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        $api->any('weixin/oautha', 'OauthController@oautha');
        $api->any('weixin/oauth_callbacka', 'OauthController@oauth_callbacka');
        $api->any('weixin/pay_view_a', 'OauthController@pay_view_a');
        $api->any('weixin/member_cz_pay_viewa', 'OauthController@member_cz_pay_viewa');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //获取到open_id
        $api->any('weixin/oauth_openida', 'OauthController@oauth_openida');
        $api->any('weixin/oauth_callback_openida', 'OauthController@oauth_callback_openida');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

    });

    //传化需token
    $api->group(['namespace' => 'App\Api\Controllers\Tfpay', 'prefix' => 'tfpay', 'middleware' => 'public.api'], function ($api) {
        $api->any('select_bank', 'SelectController@select_bank');
    });

    //网商 需token
    $api->group(['namespace' => 'App\Api\Controllers\MyBank', 'prefix' => 'mybank', 'middleware' => 'public.api'], function ($api) {
        $api->any('payResultQuery', 'SelectController@payResultQuery');
        $api->any('storeinfo', 'SelectController@storeinfo');
        $api->any('set_weixin_path', 'SelectController@set_weixin_path');

        $api->any('import_mercId', 'SelectController@import_mercId');
        $api->any('store_list', 'SelectController@store_list');
        $api->any('del_store', 'SelectController@del_store');


    });

    //会员宝 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Huiyuanbao', 'prefix' => 'huiyuanbao'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
        $api->any('store_notify', 'NotifyController@store_notify');
        $api->any('pay_action', 'QrPayController@pay_action');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

    });

    //新大陆
    $api->group(['namespace' => 'App\Api\Controllers\Newland', 'prefix' => 'newland'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
        $api->any('store_query', 'SelectController@store_query');
        $api->any('mcc_query', 'SelectController@mcc_query');
    });

    //无需token
    $api->group(['namespace' => 'App\Api\Controllers\Weixin', 'prefix' => 'weixin'], function ($api) {
        $api->any('oauth', 'OauthController@oauth');
        $api->any('callback', 'OauthController@callback');
        $api->any('qr_pay_notify', 'NotifyController@qr_pay_notify');
        $api->any('school_pay_notify', 'NotifyController@school_pay_notify');

        $api->any('mini_notify', 'NotifyController@mini_notify');

        $api->any('goods_notify', 'NotifyController@goods_notify');

        $api->any('oautha', 'OauthController@oautha'); //微信支付a 授权
        $api->any('callbacka', 'OauthController@callbacka'); //微信支付a 授权回调
        $api->any('qr_pay_notify_a', 'NotifyController@qr_pay_notify_a'); //微信支付a 支付回调
        $api->any('school_pay_notify_a', 'NotifyController@school_pay_notify_a'); //微信支付a

        //支付静态页面
        $api->any('qr_pay_view', 'OauthController@qr_pay_view');
        $api->any('qr_pay_view_a', 'OauthController@qr_pay_view_a'); //微信支付a
        $api->any('member_cz_pay_view', 'OauthController@member_cz_pay_view');
        $api->any('paydetails', 'OauthController@paydetails');
        $api->any('server', 'ServerController@server');

        $api->any('getWXCardBgColor', 'WxCardController@getWXCardBgColor');
        $api->any('getWXCardType', 'WxCardController@getWXCardType');
        $api->any('getWXCardCodeType', 'WxCardController@getWXCardCodeType');
        $api->any('createCardLandingpage', 'WxCardController@createCardLandingpage');
        $api->any('getCardCode', 'WxCardController@getCardCode');
        $api->any('consumeCardCode', 'WxCardController@consumeCardCode');
        $api->any('getCardList', 'WxCardController@getCardList');
        $api->any('getCardInfo', 'WxCardController@getCardInfo');
        $api->any('getCardBatch', 'WxCardController@getCardBatch');
        $api->any('getCardBizuinInfo', 'WxCardController@getCardBizuinInfo');
        $api->any('getCardCardInfo', 'WxCardController@getCardCardInfo');
        $api->any('user', 'UserController@index');
        $api->any('user-openid', 'UserController@get_openid');
        $api->any('user-pay', 'UserController@pay');
        $api->any('betapay', 'UserController@betapay');
        $api->any('test', 'UserController@test');

    });

    //微信开放平台
    $api->group(['namespace' => 'App\Api\Controllers\WeixinOpen', 'prefix' => 'weixinopen'], function ($api) {
        //公众号授权平台
        $api->any('openoauth', 'OpenOauthController@openoauth');
        $api->any('opencallback', 'OpenOauthController@opencallback');
        $api->any('auth_notify', 'NotifyController@auth_notify');
        $api->any('oauth', 'OauthController@oauth');
        $api->any('callback', 'OauthController@callback');
        $api->any('remind_notify/{appid}', 'NotifyController@remind_notify');

    });

    //需token
    $api->group(['namespace' => 'App\Api\Controllers\Basequery', 'prefix' => 'basequery', 'middleware' => 'public.api'], function ($api) {
        $api->any('upload', 'UploadController@upload');
        $api->any('webupload', 'UploadController@webupload');
        $api->any('contact', 'AppIndexController@contact');
        $api->any('file_content', 'UploadController@file_content');

        $api->any('merchant_lists', 'SelectController@merchant_lists');
        $api->any('store_type', 'SelectController@store_type');
        $api->any('store_category', 'SelectController@store_category');
        $api->any('bank', 'SelectController@bank');
        $api->any('sub_bank', 'SelectController@sub_bank');
        $api->any('order_query_b', 'SelectController@order_query_b');
        $api->any('app_oem_info', 'SelectController@app_oem_info');
        $api->any('j_push_info', 'SelectController@j_push_info');
        $api->any('sms_info', 'SelectController@sms_info');
        $api->any('sms_type', 'SelectController@sms_type');
        $api->any('update_order', 'SelectController@update_order');
        $api->any('update_server', 'SelectController@update_server');
        $api->any('app_logos_info', 'SelectController@app_logos_info');

        $api->any('/updateInfo', 'AppController@updateInfo')->name("updateInfo");
        $api->any('/appUpdateFile', 'AppController@appUpdateFile')->name("appUpdateFile");
        $api->any('/ysyUpdateInfo', 'AppController@ysyUpdateInfo')->name("ysyUpdateInfo"); //云收易系统更新信息
        $api->any('/ysyAppUpdateFile', 'AppController@ysyAppUpdateFile')->name("ysyAppUpdateFile"); //云收易系统更新
        $api->any('/setApp', 'AppController@setApp')->name("setApp");
        $api->any('/setAppPost', 'AppController@setAppPost')->name("setAppPost");

        $api->any('count_pt_data', 'SelectController@count_pt_data');
        $api->any('count_pt_data_excel', 'SelectController@count_pt_data_excel');

        $api->any('tf_bb', 'SelectController@tf_bb');

    });

    //无需token
    $api->group(['namespace' => 'App\Api\Controllers\Basequery', 'prefix' => 'basequery'], function ($api) {

        $api->any('tf_store_bb', 'SelectController@tf_store_bb');

        $api->any('xcx_logos_info', 'SelectController@xcx_logos_info'); //小程序二维码
    });

    //需token 角色权限
    $api->group(['namespace' => 'App\Api\Controllers\RolePermission', 'prefix' => 'role_permission', 'middleware' => 'public.api'], function ($api) {
        $api->any('role_list', 'RoleController@role_list');
        $api->any('permission_list', 'RoleController@permission_list');
        $api->any('assign_role', 'RoleController@assign_role');
        $api->any('assign_permission', 'RoleController@assign_permission');
        $api->any('add_role', 'RoleController@add_role');
        $api->any('add_permission', 'RoleController@add_permission');
        $api->any('user_role_list', 'RoleController@user_role_list');
        $api->any('role_permission_list', 'RoleController@role_permission_list');
        $api->any('del_role', 'RoleController@del_role');
        $api->any('del_permission', 'RoleController@del_permission');
        $api->any('merchant_permission_list', 'RoleController@merchant_permission_list');
        $api->any('user_permission_list', 'RoleController@user_permission_list');
        $api->any('user_assign_permission', 'RoleController@user_assign_permission');

    });

    // 短信接口
    $api->group(['namespace' => 'App\Api\Controllers\Sms', 'prefix' => 'Sms'], function ($api) {
        $api->any('send', 'SmsController@send');
        $api->any('test', 'SmsController@test');
    });

    //设备管理
    $api->group(['namespace' => 'App\Api\Controllers\Device', 'prefix' => 'device', 'middleware' => 'public.api'], function ($api) {
        $api->any('device_type', 'DeviceController@device_type');
        $api->any('add', 'DeviceController@add');
        $api->any('lists', 'DeviceController@lists');
        $api->any('up', 'DeviceController@up');
        $api->any('del', 'DeviceController@del');
        $api->any('select', 'DeviceController@select');
        $api->any('get_device', 'DeviceController@get_device');
        $api->any('v_config', 'DeviceController@v_config');
        $api->any('print_tpl', 'PrintController@print_tpl');
        $api->any('order_tpl', 'PrintController@order_tpl');


        $api->any('device_oem_lists', 'SelectController@device_oem_lists');
        $api->any('device_oem_del', 'SelectController@device_oem_del');
        $api->any('device_oem_add', 'SelectController@device_oem_add');
        $api->any('device_oem_up', 'SelectController@device_oem_up');
        $api->any('device_oem_info', 'SelectController@device_oem_info');
        $api->any('device_oem_import', 'SelectController@device_oem_import');


    });

    //导出管理
    $api->group(['namespace' => 'App\Api\Controllers\Export', 'prefix' => 'export', 'middleware' => 'public.api'], function ($api) {
        $api->any('MerchantOrderExcelDown', 'OrderExportController@MerchantOrderExcelDown'); //商户端 流水查询导出
        $api->any('export_stores', 'OrderExportController@export_stores'); //商户端 流水查询导出
        $api->any('UserOrderExcelDown', 'OrderExportController@UserOrderExcelDown');
        $api->any('UserCompanyExcelDown', 'OrderExportController@UserCompanyExcelDown');
        $api->any('UserOrderExcelDownLoad', 'OrderExportController@UserOrderExcelDownLoad');
        $api->any('lastbill', 'OrderExportController@lastbill');
        $api->any('merchant_turnover_last_week', 'OrderExportController@merchant_turnover_last_week');
        $api->any('allinpayah_count', 'OrderExportController@allinpayah_count');
        $api->any('user_stores', 'OrderExportController@user_stores');
        $api->any('merchant_company', 'OrderExportController@merchant_company');
        $api->any('exportQrcode', 'OrderExportController@exportQrcode');
        $api->any('MerchantOrderCountExcelDown', 'OrderExportController@MerchantOrderCountExcelDown');
        $api->any('OrderMounthCountExportDown', 'OrderExportController@OrderMounthCountExportDown'); //代理月对账查询  OK
        $api->any('OrderMonthCountExportDown', 'OrderExportController@OrderMonthCountExportDown');  //门店月对账导出  ok
        $api->any('OrdermouthcountdataDown', 'OrderExportController@OrdermouthcountdataDown');  //商户管理系统 月对账导出
        $api->any('CommissionExcelDown', 'OrderExportController@CommissionExcelDown'); //分润账单导出
        $api->any('SFKJCommissionExcelDown', 'OrderExportController@SFKJCommissionExcelDown'); //首付科技-分润账单导出
        $api->any('facePaymentExcelDown', 'OrderExportController@facePaymentExcelDown'); //刷脸支付(去重)统计导出
        $api->any('facePaymentDisExcelDown', 'OrderExportController@facePaymentDisExcelDown'); //刷脸设备(去重)统计导出

        $api->any('exportQrcode', 'OrderExportController@exportQrcode');
        $api->any('pingan_tag', 'OrderExportController@pingan_tag');
        $api->any('pingan_chajian', 'OrderExportController@pingan_chajian');
        $api->any('sign_manage', 'OrderExportController@sign_manage');
        $api->any('user_store_count_ExcelDown', 'OrderExportController@user_store_count_ExcelDown');
        $api->any('TransactionListExcelDownLoad', 'OrderExportController@TransactionListExcelDownLoad');
    });

    //赏金管理
    $api->group(['namespace' => 'App\Api\Controllers\Wallet', 'prefix' => 'wallet', 'middleware' => 'public.api'], function ($api) {
        $api->any('source_type', 'SelectController@source_type');
        $api->any('source_query', 'SelectController@source_query');
        $api->any('serivce_money', 'SelectController@serivce_money');
        $api->any('source_query_info', 'SelectController@source_query_info');
        $api->any('records_query_info', 'SelectController@records_query_info');
        $api->post('commission_lists', 'SelectController@commission_lists');  //分润账单
        $api->any('commission_count', 'SelectController@commission_count');  //通道分润总计
        $api->any('commission_store', 'SelectController@commission_store');  //通道分润总计
        $api->any('sub_commission_store', 'SelectController@sub_commission_store');  //下级代理通道分润总计
        $api->any('commission_store_company', 'SelectController@commission_store_company');  //通道分润总计
        $api->any('sub_commission_store_company', 'SelectController@sub_commission_store_company');  //下级通道分润总计
        $api->any('view_branch', 'SelectController@view_branch');  // 查看分店
        $api->any('get_user_company', 'SelectController@get_user_company');  //获取代理默认通道
        $api->post('sf_commission_lists', 'SelectController@sf_commission_lists');  //首付科技-分润账单
        $api->post('settlementDayQuery', 'SelectController@settlementDayQuery'); //日结算列表
        $api->post('dayInfo', 'SelectController@dayInfo'); //日结算单条信息
        $api->post('upSettlement', 'SelectController@upSettlement'); //更改税率
        $api->post('changeDaily', 'SelectController@changeDaily'); //更改日常开关


        $api->any('account', 'SelectController@account');
        $api->any('add_account', 'SelectController@add_account');
        $api->any('out_wallet', 'SelectController@out_wallet');
        $api->any('out_wallet_list', 'SelectController@out_wallet_list');
        $api->any('settlement', 'SelectController@settlement');
        $api->any('addSettlement', 'SelectController@addSettlement');//日结算新增


        $api->any('settlement_configs', 'setController@settlement_configs');
        $api->any('settlement_lists', 'SelectController@settlement_lists');
        $api->any('settlement_list_infos', 'SelectController@settlement_list_infos');
        $api->any('settlement_list_del', 'SelectController@settlement_list_del');
        $api->any('settlement_list_true', 'SelectController@settlement_list_true');
        $api->any('tf_settlemment', 'SelectController@tf_settlemment');
        $api->any('tf_settlemment_m', 'SelectController@tf_settlemment_m');
        $api->any('tf_user_settlemment', 'SelectController@tf_user_settlemment');
        $api->any('tf_settlemment_all', 'SelectController@tf_settlemment_all');


    });

    //广告管理
    $api->group(['namespace' => 'App\Api\Controllers\Ad', 'prefix' => 'ad'], function ($api) {
        $api->any('ad_lists', 'AdController@ad_lists');
        $api->any('ad_create', 'AdController@ad_create');
        $api->any('ad_up', 'AdController@ad_up');
        $api->any('ad_del', 'AdController@ad_del');
        $api->any('ad_p_id', 'AdController@ad_p_id');
        $api->any('ad_info', 'AdController@ad_info');

        $api->any('ad_lists_new', 'AdController@ad_lists_new');
    });

    //活动
    $api->group(['namespace' => 'App\Api\Controllers\Huodong', 'prefix' => 'huodong', 'middleware' => 'public.api'], function ($api) {
        $api->any('get_list', 'AlipayHongbao@get_list');
        $api->any('PublicEncrypt', 'AlipayHongbao@PublicEncrypt');
        $api->any('PrivateDecrypt', 'AlipayHongbao@PrivateDecrypt');
        $api->any('add', 'AlipayHongbao@add');
        $api->any('del', 'AlipayHongbao@del');


        //拉新
        $api->any('hd_list', 'SelectController@hd_list');
        $api->any('old_hd_list', 'SelectController@old_hd_list');
        $api->any('get_info', 'SelectController@get_info');


        $api->any('jdbt', 'JdbtController@jdbt');


    });

    //微收银 支付
    $api->group(['namespace' => 'App\Api\Controllers\Qwx', 'prefix' => 'qwx'], function ($api) {
        $api->any('scan_pay', 'IndexController@scan_pay');
        $api->any('order_query', 'IndexController@order_query');
        $api->any('refund', 'IndexController@refund');
        $api->any('refund_query', 'IndexController@refund_query');

        $api->any('add_store', 'IndexController@add_store');
    });

    //意锐 支付
    $api->group(['namespace' => 'App\Api\Controllers\In', 'prefix' => 'in'], function ($api) {
        $api->any('scan_pay', 'IndexController@scan_pay');
        $api->any('order_query', 'IndexController@order_query');
        $api->any('refund', 'IndexController@refund');
        $api->any('cancel', 'IndexController@cancel');
        $api->any('consume', 'IndexController@consume');
        $api->any('device_order', 'IndexController@device_order');
        $api->any('order_query_count', 'IndexController@order_query_count');
        $api->any('query_store', 'IndexController@query_store');
        $api->any('login', 'IndexController@login');
        $api->any('login_out', 'IndexController@login_out');

    });

    //微收银 token
    $api->group(['namespace' => 'App\Api\Controllers\Qwx', 'prefix' => 'qwx', 'middleware' => 'public.api'], function ($api) {
        $api->any('add_store', 'StoreController@add_store');
        $api->any('add_code', 'StoreController@add_code');
        $api->any('del_code', 'StoreController@del_code');
        $api->any('code_list', 'StoreController@code_list');

        $api->post('get_order_by_authcode', 'SelectController@get_order_by_authcode');
        $api->any('add_code_pc', 'StoreController@add_code_pc');
    });

    //收钱啦 token
    $api->group(['namespace' => 'App\Api\Controllers\WinCode', 'prefix' => 'wincode', 'middleware' => 'public.api'], function ($api) {
        $api->any('add_store', 'StoreController@add_store');
        $api->any('add_code', 'StoreController@add_code');
        $api->any('del_code', 'StoreController@del_code');
        $api->any('code_list', 'StoreController@code_list');

        $api->post('get_order_by_authcode', 'SelectController@get_order_by_authcode');
        $api->any('add_code_pc', 'StoreController@add_code_pc');
    });


    //萤火虫 token
    $api->group(['namespace' => 'App\Api\Controllers\Glow', 'prefix' => 'glow', 'middleware' => 'public.api'], function ($api) {
        $api->any('add_store', 'StoreController@add_store');
        $api->any('add_code', 'StoreController@add_code');
        $api->any('del_code', 'StoreController@del_code');
        $api->any('resetpassword', 'IndexController@resetpassword');
        $api->any('export_rate', 'IndexController@export_rate');
        $api->any('avg_daily_payment', 'IndexController@avg_daily_payment');
        $api->any('payment_channel', 'IndexController@payment_channel');
        $api->any('code_list', 'StoreController@code_list');

        $api->post('get_order_by_authcode', 'SelectController@get_order_by_authcode');
        $api->any('get_waycount', 'IndexController@get_waycount');
        $api->any('resetpassword', 'IndexController@resetpassword');
        $api->any('payment_channel', 'IndexController@payment_channel');
        $api->any('all_stroes', 'IndexController@all_stroes');
        $api->any('by_cashier', 'IndexController@by_cashier');
        $api->any('view_cashier', 'IndexController@view_cashier');
        $api->any('add_merchant', 'IndexController@add_merchant');
        $api->any('view_cashier_records', 'IndexController@view_cashier_records');
        $api->any('view_store_records', 'IndexController@view_store_records');
        $api->post('get_order_by_authcode', 'SelectController@get_order_by_authcode');

        $api->any('export_rate', 'IndexController@export_rate');
        $api->any('already_opened', 'IndexController@already_opened');
        $api->any('check_results', 'IndexController@check_results');
        $api->any('vbill_del', 'IndexController@vbill_del');
        $api->any('mechanism_merchant_add', 'IndexController@mechanism_merchant_add');
        $api->any('merchant_bill', 'IndexController@merchant_bill');
        $api->any('certification', 'IndexController@certification');
        $api->any('queryApplyInfo', 'IndexController@queryApplyInfo');
        $api->any('backApplyBill', 'IndexController@backApplyBill');
        $api->any('stores_loss', 'IndexController@stores_loss');
        $api->any('configure_channel', 'IndexController@configure_channel');
        $api->any('agent_level', 'IndexController@agent_level');
        $api->any('view_branch', 'IndexController@view_branch');
        $api->any('view_merchant', 'IndexController@view_merchant');
        $api->any('billing', 'IndexController@billing');
        $api->any('billing_qrcode', 'IndexController@billing_qrcode');
        $api->any('nuonuo_stores_add', 'IndexController@nuonuo_stores_add');
        $api->any('nuonuo_stores', 'IndexController@nuonuo_stores');
        $api->any('add_pass', 'IndexController@add_pass');
        $api->any('pass_list', 'IndexController@pass_list');
        $api->any('add_pass_do', 'IndexController@add_pass_do');
        $api->any('pass_verify_do', 'IndexController@pass_verify_do');
        $api->any('sign_manage', 'IndexController@sign_manage');
        $api->any('check_linkage_results', 'IndexController@check_linkage_results');
        $api->any('check_wingpay_results', 'IndexController@check_wingpay_results');
        $api->any('check_yinsheng_results', 'IndexController@check_yinsheng_results');
        $api->any('key_list', 'IndexController@key_list');
        $api->any('pass_find', 'IndexController@pass_find');
        $api->any('pass_edit', 'IndexController@pass_edit');
        $api->any('nuonuo_category', 'IndexController@nuonuo_category');
        $api->any('m_ceshi', 'IndexController@m_ceshi');
        $api->any('nuonuo_list', 'NuonuoController@nuonuo_list');
        $api->any('nuonuo_set_default', 'NuonuoController@nuonuo_set_default');
        $api->any('del_nuonuo', 'NuonuoController@del_nuonuo');
        $api->any('stores_list', 'UserController@stores_list');
        $api->any('create_merchant', 'UserController@create_merchant');
        $api->any('re_billing', 'NuonuoController@re_billing');
        $api->any('store_count', 'NeedController@store_count');
        $api->any('get_stores', 'NeedController@get_stores');
    });

    //京东支付
    $api->group(['namespace' => 'App\Api\Controllers\Jd', 'prefix' => 'jd'], function ($api) {
        $api->any('notify_url', 'NotifyController@notify_url');
        $api->any('refund_url', 'NotifyController@refund_url');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

    });

    //新大陆支付
    $api->group(['namespace' => 'App\Api\Controllers\Newland', 'prefix' => 'newland'], function ($api) {
        $api->any('refund_url', 'NotifyController@refund_url');
        $api->any('pay_notify', 'NotifyController@pay_notify');
        $api->any('store_query', 'SelectController@store_query');
        $api->any('mcc_query', 'SelectController@mcc_query');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');
        $api->any('pay_action', 'QrPayController@pay_action');


    });

    //新大陆支付 token
    $api->group(['namespace' => 'App\Api\Controllers\Newland', 'prefix' => 'newland', 'middleware' => 'public.api'], function ($api) {
        $api->any('open_da', 'SelectController@open_da');
        $api->any('get_da_info', 'SelectController@get_da_info');
        $api->any('da_out_select', 'SelectController@da_out_select');
        $api->any('get_da', 'SelectController@get_da');
        $api->any('set_da_rate', 'SelectController@set_da_rate');
        $api->any('import_mercId', 'SelectController@import_mercId');
        $api->any('store_list', 'SelectController@store_list');
        $api->any('del_store', 'SelectController@del_store');
    });

    //新大陆支付 token
    $api->group(['namespace' => 'App\Api\Controllers\Newland', 'prefix' => 'newland', 'middleware' => 'public.api'], function ($api) {
        $api->any('PayInOrder', 'QrPayController@PayInOrder');


    });

    //系统报错上报接口
    $api->group(['namespace' => 'App\Api\Controllers\Errors', 'prefix' => 'errors'], function ($api) {
        $api->any('self_errors', 'SelfErrorsController@self_errors');
    });

    //设备接口
    $api->group(['namespace' => 'App\Api\Controllers\DevicePay', 'prefix' => 'devicepay'], function ($api) {

        $api->any('scan_pay', 'IndexController@scan_pay');
        $api->any('getStoreInfo', 'IndexController@getStoreInfo');
        $api->any('getStoreHaiDian', 'IndexController@getStoreHaiDian');
        $api->any('getDeviceInfo', 'IndexController@getDeviceInfo');
        $api->any('yhc_pay', 'IndexController@yhc_pay');
        $api->any('yhc_initdevicebrand', 'IndexController@yhc_initdevicebrand');
        $api->any('yhc_initgwwsoftmsg', 'IndexController@yhc_initgwwsoftmsg');
        $api->any('yhc_inityhcv5softmsg', 'IndexController@yhc_inityhcv5softmsg');
        $api->any('abc_notifyurl', 'IndexController@abc_notifyurl');
        $api->any('yhc_orderquery', 'IndexController@yhc_orderquery');
        $api->any('yhc_refund', 'IndexController@yhc_refund');
        $api->any('yhc_refundquery', 'IndexController@yhc_refundquery');

        $api->any('qr_pay', 'IndexController@qr_pay');

        $api->any('canyinlogin', 'CanyinController@canyinlogin');
        $api->any('canyinlogin2', 'CanyinController@canyinlogin2');
        $api->any('canyinpay', 'CanyinController@canyinpay');
        $api->any('refundquery', 'CanyinController@refundquery');
        $api->any('refund_cx', 'CanyinController@refund_cx');
        $api->any('getlist', 'CanyinController@getlist');
        $api->any('handover', 'CanyinController@handover');
        $api->any('printpay', 'CanyinController@printpay');
        $api->any('over', 'CanyinController@over');
        $api->any('app_device_register', 'CanyinController@app_device_register');
        $api->any('logoApi', 'CanyinController@logoApi');
        $api->any('list_detail', 'CanyinController@list_detail');
        $api->any('device_check', 'CanyinController@device_check');

        $api->any('qr_auth_pay', 'IndexController@qr_auth_pay');
        $api->any('mini_order_query', 'IndexController@mini_order_query');
        $api->any('mini_refund', 'IndexController@mini_refund');
        $api->any('mini_refund_query', 'IndexController@mini_refund_query');
        $api->any('queryOpenid', 'IndexController@queryOpenid');
        $api->any('store_pay_ways', 'IndexController@store_pay_ways');
        $api->any('order', 'IndexController@order');
        $api->any('order_list', 'IndexController@order_list');

        $api->any('mini_pay', 'IndexController@mini_pay');

        $api->any('get_mq_info', 'SelectController@get_mq_info');
        $api->any('order_query', 'IndexController@order_query');
        $api->any('order_query_v2', 'IndexController@order_query_v2');
        $api->any('refund', 'IndexController@refund');
        $api->any('refund_query', 'IndexController@refund_query');

        $api->any('GetRequestApiUrl', 'SelectController@GetRequestApiUrl');
        $api->any('update', 'SelectController@update');


        $api->any('face_device_start', 'DeviceFaceController@face_device_start');
        $api->any('face_pay_start', 'DeviceFaceController@face_pay_start');
        $api->any('wxfacepay_initialize', 'DeviceFaceController@wxfacepay_initialize');
        $api->any('all_pay', 'DeviceFaceController@all_pay');
        $api->any('all_pay_query', 'DeviceFaceController@all_pay_query');
        $api->any('order_pay_cancel', 'DeviceFaceController@order_pay_cancel');
        $api->any('jiujiang_refund', 'IndexController@jiujiang_refund');

    });

    //设备接口 -分期
    $api->group(['namespace' => 'App\Api\Controllers\DevicePay', 'prefix' => 'devicepay'], function ($api) {
        $api->any('fq_scan_pay', 'FqIndexController@fq_scan_pay');
        $api->any('fq_order_query', 'FqIndexController@fq_order_query');
        $api->any('fq_query_rate', 'FqIndexController@fq_query_rate');
        $api->any('fq_refund', 'FqIndexController@fq_refund');
    });

    //代付 token
    $api->group(['namespace' => 'App\Api\Controllers\DfPay', 'prefix' => 'dfpay', 'middleware' => 'public.api'], function ($api) {
        $api->any('info_import', 'IndexController@info_import');
        $api->any('order_list', 'IndexController@order_list');
    });

    //代付
    $api->group(['namespace' => 'App\Api\Controllers\DfPay', 'prefix' => 'dfpay'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
    });

    //哆啦宝
    $api->group(['namespace' => 'App\Api\Controllers\DuoLaBao', 'prefix' => 'dlb'], function ($api) {
        $api->any('test', 'ManageController@test');
        $api->any('pay_notify', 'ManageController@pay_notify');
        $api->any('audit_notify', 'ManageController@audit_notify'); //审核结果回调
        $api->any('store_notify', 'ManageController@store_notify');
        $api->any('weixin/oauth', 'WxOauthController@oauth');
        $api->any('weixin/callback', 'WxOauthController@callback');
        $api->any('weixinopen/oauth', 'WxOpenOauthController@oauth');
        $api->any('weixinopen/callback', 'WxOpenOauthController@callback');
        $api->any('weixin/qr_pay_view', 'WxOauthController@qr_pay_view');
        $api->any('weixin/member_cz_pay_view', 'WxOpenOauthController@member_cz_pay_view');
    });

    //汇付无需token
    $api->group(['namespace' => 'App\Api\Controllers\HuiPay', 'prefix' => 'huipay'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //交易回调
        $api->any('return_pay_notify_url', 'NotifyController@return_pay_notify_url'); //退款回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        //进件查询
        $api->post('getStatusQuery','TrilateralBaseQueryController@getStatusQuery');

    });

    //易生 无需token
    $api->group(['namespace' => 'App\Api\Controllers\EasyPay', 'prefix' => 'easypay'], function ($api) {
//        $api->any('pay_notify', 'NotifyController@pay_notify'); //(主扫支付)支付回调
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //(公众号/服务窗支付)支付回调
//        $api->any('refund_notify_url', 'NotifyController@refund_notify_url'); //
        $api->any('merchant_apply_query', 'MerchantController@query');
        $api->any('merchant_apply_info', 'MerchantController@info');
        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户审核状态变更后的通知地址
        $api->any('merchant_bank_info_modify_notify_url', 'NotifyController@merchant_bank_info_modify_notify_url'); //商户结算卡变更状态的通知地址

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        $api->any('test', 'TestController@test');
    });

    //海科融通 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Hkrt', 'prefix' => 'hkrt'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
        $api->any('refund_notify_url', 'NotifyController@refund_notify_url');
        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户审核状态变更后的通知地址
        $api->any('merchant_bank_info_modify_notify_url', 'NotifyController@merchant_bank_info_modify_notify_url'); //商户结算卡变更状态的通知地址

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        //test
        $api->any('test', 'TestController@test');
    });

    //葫芦天下
    $api->group(['namespace' => 'App\Api\Controllers\Hltx', 'prefix' => 'hltx'], function ($api) {
        $api->any('test', 'TestController@test');
        $api->any('alipay_view', 'TestController@alipay_view');
        $api->any('wx_callback', 'TestController@wx_callback');
        $api->any('wx_oauth', 'TestController@wx_oauth');
        $api->any('wxpay_view', 'TestController@wxpay_view');

        $api->any('merchant_notify', 'ManageController@merchant_notify');
        $api->any('pay_notify', 'ManageController@pay_notify');
        $api->any('weixin/oauth', 'WxOauthController@oauth');
        $api->any('weixin/callback', 'WxOauthController@callback');
        $api->any('weixinopen/oauth', 'WxOpenOauthController@oauth');
        $api->any('weixinopen/callback', 'WxOpenOauthController@callback');
        $api->any('weixin/qr_pay_view', 'WxOauthController@qr_pay_view');

    });

    $api->group(['namespace' => 'App\Api\Controllers\Hltx', 'prefix' => 'hltx', 'middleware' => 'public.api'], function ($api) {
        $api->any('edit_store_rate', 'ManageController@edit_store_rate');
        $api->any('weixin_config_set', 'ManageController@weixin_config_set');
    });

    //联动优势 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Linkage', 'prefix' => 'linkage'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户入网审核结果通知
//        $api->any('refund_notify_url', 'NotifyController@refund_notify_url'); //退款回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        $api->any('test', 'TestController@test');
    });

    // 九江银行 无需token
    $api->group(['namespace' => 'App\Api\Controllers\JiuJiang', 'prefix' => 'jiujiang'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });

    //美团配送
    $api->group(['namespace' => 'App\Api\Controllers\MeiTuanPeiSong', 'prefix' => 'mtps'], function ($api) {
        $api->post('callBackStoreStatus', 'CallBackController@callBackStoreStatus'); //门店状态回调
        $api->post('callBackOrderStatus', 'CallBackController@callBackOrderStatus'); //订单状态回调
        $api->post('callBackOrderErrStatus', 'CallBackController@callBackOrderErrStatus'); //订单异常回调

        $api->get('getMeiTuanCityList', 'SelectController@getMeiTuanCityList'); //城市id列表
        $api->get('getMeiTuanCategoryList', 'SelectController@getMeiTuanCategoryList'); //品类列表

    });

    //达达配送回调 无需token
    $api->group(['namespace' => 'App\Api\Controllers\DaDa', 'prefix' => 'dada'], function ($api) {
        $api->post('callBackOrder', 'CallBackController@callBackOrder'); //订单回调
        $api->post('callBackReturnStatus', 'CallBackController@callBackReturnStatus'); //骑士取消订单回调

        $api->post('cityCodeList', 'SelectController@cityCodeList'); //城市信息列表
        $api->post('orderCancelReasons', 'SelectController@orderCancelReasons'); //取消原因列表

    });

    //达达配送 需token
    $api->group(['namespace' => 'App\Api\Controllers\DaDa', 'prefix' => 'dada', 'middleware' => 'public.api'], function ($api) {
        $api->post('merchantAdd', 'AddController@merchantAdd'); //注册商户
        $api->post('orderAddOrder', 'AddController@orderAddOrder'); //新增配送单
        $api->post('reAddOrder', 'AddController@reAddOrder'); //重新发布订单

        $api->post('orderFormalCancel', 'CancelController@orderFormalCancel'); //取消订单

        $api->post('orderStatusQuery', 'SelectController@orderStatusQuery'); //达达订单详情查询

        $api->post('dada_order_info', 'SelectController@dada_order_info'); //系统订单详情
    });

    //码上赢 插件
    $api->group(['namespace' => 'App\Api\Controllers\WinCode', 'prefix' => 'wincode'], function ($api) {
        $api->post('interaction', 'IndexController@interaction');
        $api->post('scan_pay', 'IndexController@scan_pay');
        $api->get('update_merch_token', 'IndexController@update_merch_token');
        $api->post('yszhongduan', 'IndexController@yszhongduan');
        $api->get('zhongduan', 'IndexController@zhongduan');
        $api->get('wingmerch', 'IndexController@wingmerch');
        $api->get('updata_order', 'IndexController@updata_order');
        $api->get('yirefund', 'IndexController@yirefund');
        $api->get('getorder', 'IndexController@getorder');
        $api->get('getfather', 'IndexController@getfather');
        $api->get('ces11', 'IndexController@ces11');
        $api->get('store_count', 'IndexController@store_count');
        $api->get('store_count1', 'IndexController@store_count1');
        $api->get('sssdf', 'IndexController@sssdf');
        $api->get('company_commission', 'IndexController@company_commission');
        $api->get('cefenrun', 'IndexController@cefenrun');
        $api->get('editstore_sort', 'IndexController@editstore_sort');
        $api->get('CG02', 'IndexController@CG02');
        $api->get('create_data', 'IndexController@create_data');
        $api->get('company_day_commission_more', 'IndexController@company_day_commission_more');
        $api->get('create_database', 'IndexController@create_database');
        $api->get('move_data', 'IndexController@move_data');
        $api->any('youpaycallback', 'IndexController@youpaycallback');
        $api->get('store_totalmoney_zero', 'IndexController@store_totalmoney_zero');
        $api->get('stop_stores', 'IndexController@stop_stores');
        $api->get('allinpay_organ', 'IndexController@allinpay_organ');
        $api->get('cscompany_commission', 'IndexController@cscompany_commission');
        $api->any('ceshi1', 'IndexController@ceshi1');
        $api->get('get_ratamoney', 'IndexController@get_ratamoney');
        $api->get('getdayserver', 'IndexController@getdayserver');
        $api->get('add_service_bill', 'IndexController@addServiceBill');
        $api->get('service_money_day', 'IndexController@service_money_day');
        $api->get('updata_unorder', 'IndexController@updata_unorder');
        $api->get('update_refund_order', 'IndexController@update_refund_order');
        $api->get('ceshi', 'IndexController@ceshi');
        $api->get('cs', 'IndexController@cs');
    });

    //威富通支付 无需token
    $api->group(['namespace' => 'App\Api\Controllers\WftPay', 'prefix' => 'wftpay'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
//        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户入网审核结果通知
//        $api->any('refund_notify_url', 'NotifyController@refund_notify_url'); //退款回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        $api->any('test', 'PayController@test');
    });

    //汇旺财支付 无需token
    $api->group(['namespace' => 'App\Api\Controllers\HwcPay', 'prefix' => 'hwcpay'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
//        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户入网审核结果通知
//        $api->any('refund_notify_url', 'NotifyController@refund_notify_url'); //退款回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

    });

    // 银卡 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Yinka', 'prefix' => 'yinka'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('update_token', 'IndexController@updateToken'); //更新token

        $api->any('oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('oauth_callback', 'OauthController@oauth_callback');
        $api->any('pay_view', 'OauthController@pay_view');
    });

    // 兴业银行 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Cib', 'prefix' => 'cib'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });


    $api->group(['namespace' => 'App\Api\Controllers\Postar', 'prefix' => 'postar'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('apply_notify_url', 'NotifyController@apply_notify_url'); //支付回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });

    // 国通 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Gtxy', 'prefix' => 'gtxy'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });

    // 民生银行 无需token
    $api->group(['namespace' => 'App\Api\Controllers\Cmbc', 'prefix' => 'cmbc'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });

    //东莞银行
    $api->group(['namespace' => 'App\Api\Controllers\DongGuan', 'prefix' => 'dongguan'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('merchant_apply_notify_url', 'NotifyController@merchant_apply_notify_url'); //商户入网审核结果通知
//        $api->any('refund_notify_url', 'NotifyController@refund_notify_url'); //退款回调

        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');

        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');

        //sign
        $api->any('weixin/oauth_sign_openid', 'OauthOpenidController@oauth_sign_openid');
        $api->any('weixin/oauth_sign_callback_openid', 'OauthOpenidController@oauth_sign_callback_openid');

        $api->any('test', 'TestController@test');
    });

    //银盛

    $api->group(['namespace' => 'App\Api\Controllers\YinSheng', 'prefix' => 'yinsheng'], function ($api) {
        $api->any('pay_notify', 'NotifyController@pay_notify');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');

        //pos
        $api->any('pos', 'NotifyController@pos');
        $api->any('notifyPayResult', 'NotifyController@notifyPayResult');
        //静态码提交接口
        $api->any('qr_pay_submit', 'QrpayController@qr_pay_submit');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('weixin/member_cz_pay_view', 'OauthController@member_cz_pay_view');
        //获取到open_id
        $api->any('weixin/oauth_openid', 'OauthController@oauth_openid');
        $api->any('weixin/oauth_callback_openid', 'OauthController@oauth_callback_openid');
        //随行付
        $api->any('ali_pay', 'OauthController@ali_pay');
        //支付宝
        $api->any('un_pay', 'OauthController@un_pay');


    });

    $api->group(['namespace' => 'App\Api\Controllers\YSEPay', 'prefix' => 'ysepay'], function ($api) {
        $api->any('pay_view', 'OauthController@payView');
        $api->any('notify_url', 'NotifyController@notify');//进件相关回调
        $api->any('pay_notify', 'NotifyController@payNotify');//支付回调
        $api->any('refund_notify', 'NotifyController@refundNotify');//退款回调
    });

    //东莞银行
    $api->group(['namespace' => 'App\Api\Controllers\Dong_Guan', 'prefix' => 'dong_guan'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('un_pay', 'OauthController@un_pay');
    });

    //apk
    $api->group(['namespace' => 'App\Api\Controllers\Apk', 'prefix' => 'apk'], function ($api) {
        $api->post('apkLists', 'ApkController@apkLists');
        $api->post('apkCreate', 'ApkController@apkCreate');
        $api->post('apkUpload', 'ApkController@apkUpload');
        $api->post('apkUp', 'ApkController@apkUp');
        $api->post('apkInfo', 'ApkController@apkInfo');
        $api->post('apkDel', 'ApkController@apkDel'); //删除apk
    });

    //广告链接管理
    $api->group(['namespace' => 'App\Api\Controllers\AdLinks', 'prefix' => 'adlinks'], function ($api) {
        $api->post('adlinkslists', 'AdLinksController@adlinkslists'); //广告链接列表
        $api->post('adlinksCreate', 'AdLinksController@adlinksCreate'); //新增广告链接
        $api->any('ad_up', 'AdLinksController@ad_up');
        $api->any('ad_del', 'AdLinksController@ad_del');
        $api->any('ad_p_id', 'AdLinksController@ad_p_id');
        $api->any('ad_info', 'AdLinksController@ad_info');
    });


    //民生联合
    $api->group(['namespace' => 'App\Api\Controllers\CmbcUnion', 'prefix' => 'cmbcunion'], function ($api) {
        $api->any('weixin/oauth', 'WxOauthController@oauth');
        $api->any('weixin/callback', 'WxOauthController@callback');
        $api->any('weixin/pay_view', 'WxOauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
        $api->any('get_quota', 'LogicController@getQuota');
        $api->any('unionpay', 'OauthController@unionpay');
    });
    //联厚支付
    $api->group(['namespace' => 'App\Api\Controllers\Lianhou', 'prefix' => 'lianhou'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
    });
    //拉卡拉
    $api->group(['namespace' => 'App\Api\Controllers\Lakala', 'prefix' => 'lakala'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
    });


    $api->group(['namespace' => 'App\Api\Controllers\LakalaUnion', 'prefix' => 'lakalaunion'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
    });

    $api->group(['namespace' => 'App\Api\Controllers\LeshuaUnion', 'prefix' => 'leshuaunion'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
        $api->any('refund_notify_url', 'NotifyController@refund_notify_url');
        $api->any('embedPayNotify', 'NotifyController@embedPayNotify');
        $api->post('getChannelDetails', 'QueryController@getChannelDetails');
    });

    //浙商
    $api->group(['namespace' => 'App\Api\Controllers\Czbank', 'prefix' => 'czbank'], function ($api) {
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url'); //支付回调
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('weixin/oauth_callback', 'OauthController@oauth_callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
    });

    //中国嘉利
    $api->group(['namespace' => 'App\Api\Controllers\Zgjl', 'prefix' => 'zgjl'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
    });

    //中国亚大
    $api->group(['namespace' => 'App\Api\Controllers\Zgyd', 'prefix' => 'zgyd'], function ($api) {
        $api->any('weixin/oauth', 'OauthController@oauth');
        $api->any('unionpay', 'OauthController@unionpay');
        $api->any('weixin/callback', 'OauthController@callback');
        $api->any('weixin/pay_view', 'OauthController@pay_view');
        $api->any('pay_notify_url', 'NotifyController@pay_notify_url');
    });

};

$api->version('v1', $apiFunc);
